<template>
	<view>
	
		
		<view class="cu-list menu sm-border" >
			
			<view class="cu-item arrow" @click="jumpClick" data-link="/pages/creator/userinfo/edit" data-modul="name">
				<view class="content">
					<text class="text-black">姓名</text>
				</view>
				<view class="action">
				    <text class="text-grey text-sm">{{ nickname }}</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="jumpClick" data-link="/pages/creator/userinfo/edit" data-modul="word">
				<view class="content">
					<text class="text-black">唯一口令</text>
				</view>
				<view class="action">
				    <text class="text-grey text-sm">{{ word }}</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="jumpClick" data-link="/pages/creator/userinfo/edit" data-modul="wxaccount">
				<view class="content">
					<text class="text-black">微信号</text>
				</view>
				<view class="action">
				    <text class="text-grey text-sm">{{ wxaccount }}</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="jumpClick" data-link="/pages/creator/userinfo/edit" data-modul="dyaccount">
				<view class="content">
					<text class="text-black">抖音号</text>
				</view>
				<view class="action">
				    <text class="text-grey text-sm">{{ dyaccount }}</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="jumpClick" data-link="/pages/creator/userinfo/edit" data-modul="dyaccount">
				<view class="content">
					<text class="text-black">手机号码</text>
				</view>
				<view class="action">
				    <text class="text-grey text-sm">{{ phone }}</text>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	const http = require('../../../utils/http.js');
	export default {
		data() {
			return {
				nickname:'',
				word:'',
				wxaccount:'',
				dyaccount:'',
				phone:''
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.getTalentInfo();
		},
		methods: {
			getTalentInfo: function (event) {
			    let that = this;
			
			    uni.showLoading({
			        title: '加载中'
			    });
			    var params = {
			        url: '/u/my/getTalentInfo',
			        method: 'POST',
			        data: {
			        },
			        callBack: function (res) {
			            uni.hideLoading();
						console.log(res);
			            if (res.code == 200) {
			               that.nickname = res.data.nickname;
			               that.wxaccount = res.data.wxaccount;
			               that.dyaccount = res.data.dyaccount;
			               that.word = res.data.word;
						   that.phone = res.data.phone;
			            } else {
			                uni.showToast({
			                    title: res.msg,
			                    duration: 2000,
			                    icon: 'none'
			                });
			            }
			        }
			    };
			    http.request(params);
			},
			jumpClick: function (e) {
			    let link = e.currentTarget.dataset.link;
			    let modul = e.currentTarget.dataset.modul;
			    uni.navigateTo({
			        url: link,
			        // 指定页面的 url
			        success: (res) => {},
			        fail: (res) => {}
			    });
			}
		}
	}
</script>

<style>

@import './userinfo.css';
</style>
